//
//  LSAppTools.h
//  Cars
//
//  Created by dllo on 15/11/19.
//  Copyright © 2015年 芦珊. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSUInteger, LHResult) {
    LHData,
    LHJSON,
    LHXML,
};
typedef NS_ENUM(NSUInteger, LHRequestStyle) {
    LHRequestJSON,
    LHRequestString
};

typedef void(^AppToolsBlock) (id result);
typedef void(^AppToolsBlockload) (id result);

@interface LSAppTools : NSObject

+(void)getDataWithURL:(NSString *)url blcok:(AppToolsBlock)blcok;

+(void)getWithUrlString: (NSString *)urlString
                   body: (NSDictionary *)body
                  block: (AppToolsBlock)block;

+ (void)postUrl:(NSString *)url
           body:(id)body
         result:(LHResult)result
   requestStyle:(LHRequestStyle)requestStyle
     headerFile:(NSDictionary *)headerFile
        success:(void (^)(id result))success
        failure:(void (^)(NSError *error))failure;

@end
